'use strict';
/**
 * 系统配置Service
 */
app.service('SysConfigService', 
['$http', '$q',
function ($http) {
	this.init = function(){
		return $http.post(
				ISS.getPath('/systemConfig/getAll')
			).then(function(resp){
				return resp.data;
			});
	}
	this.testLink = function(param){
		return $http.post(
					ISS.getPath('/systemConfig/mailTest'),
					param,
					{contentType:'json'}
				).then(function(resp){
					var data = resp.data;
					return data;
				});
	}
	this.mailSubmit = function(data){
		return $http.post(
				ISS.getPath('/systemConfig/update/2'),
				data,
				{contentType:'json'}
			).then(function(resp){
				return resp.data;
			});
	}
	this.userSubmit = function(data){
		return $http.post(
				ISS.getPath('/systemConfig/update/1'),
				data,
				{contentType:'json'}
			).then(function(resp){
				return resp.data;
			});
	}
}]);